@import '@/app/styles/variables';

.modal {
  display: none;
}

.label {
  width: 100%;
}

.chevron {
  position: absolute;
  right: 28px;
  top: 28px;
  transform: scale(1.5);
  cursor: pointer;

  &.chevron_open {
    transform: rotate(0.5turn) scale(1.5) translateY(7%);
  }
}

.input {
  display: flex;
  width: 100%;
  padding: 23px 24px;
  max-height: 74px;
  align-items: flex-start;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  gap: 16px;
  color: black;
  font-size: 20px;
  outline: none;
  font-style: normal;
  font-weight: 400;
  line-height: 26px;
  border-radius: 16px;
  border: 1px solid var(--simple-gray-day, #e1e1e1);
  background: var(--simple-morning, #fff);
  padding-right: 56px;

  &.select_input {
    cursor: pointer;
  }

  &::placeholder {
    color: var(--Simple-Gray-Evening, #ababab);
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px;
  }
}

.container {
  display: flex;
  position: absolute;
  margin-top: 4px;
  max-height: 260px;
  padding: 8px 8px 8px 8px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  border-radius: 16px;
  background: var(--Simple-Morning, #fff);
  box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.08);
  overflow-y: scroll;
  align-self: stretch;
  scrollbar-width: 4px;
  scroll-behavior: smooth;
  scrollbar-color: #ababab;
  margin-bottom: 24px;

  &::-webkit-scrollbar {
    width: 4px;
  }

  &::-webkit-scrollbar-track {
    background-color: white;
  }

  &::-webkit-scrollbar-thumb {
    background-color: #ababab;
    border-radius: 100px;
  }

  &::-webkit-scrollbar-track {
    margin: 10px 0;
  }

  &::-webkit-scrollbar-thumb:hover {
    background-color: #555;
  }

  .scrollbar-content {
    padding-right: 8px;
  }
}

.input:focus-within {
  outline: none;
}

.option {
  display: flex;
  padding: 16px;
  align-items: flex-start;
  gap: 10px;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px;
  cursor: pointer;
  align-self: stretch;
  border-radius: 12px;
  width: 100%;

  &.active_option {
    background: #ebf1fc;
  }

  &:hover:not(.active_option) {
    background: var(--Simple-Gray-Morning, #f3f3f3);
  }
}

@include media(sm) {
  .modal {
    display: block;
    height: calc(100dvh - 80px);
  }

  .search {
    position: absolute;
    top: 12px;
    left: 16px;
  }

  .close {
    position: absolute;
    top: 12px;
    right: 16px;
  }

  .another_input {
    display: inline-flex;
    width: 100%;
    height: 40px;
    padding: 10px 16px 10px 44px;
    border-radius: 12px;
    border: none;
    gap: 8px;
    outline: none;
    background-color: #f3f3f3;
  }

  .another_input:focus-within {
    outline: none;
  }

  .label_container {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .text {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    color: var(--Simple-Gray-Evening, #ababab);
  }

  .input {
    display: flex;
    width: 100%;
    height: 62px;
    border-radius: 12px;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    border: 1px solid var(--Simple-Gray-Day, #e1e1e1);
    background: var(--Simple-Morning, #fff);
    padding: 18px 16px;
    align-items: center;
    gap: 16px;

    &::placeholder {
      color: white;
    }
  }

  .input::placeholder {
    color: var(--simple-gray-evening, #ababab) !important;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
  }

  .input:disabled {
    border: 1px solid #e1e1e1 !important;
    opacity: 1;
  }

  .option_mobile {
    position: relative;
    display: flex;
    width: 100%;
    padding-bottom: 16px;
    align-items: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    border-radius: 12px;
    gap: 16px;
    border-radius: 0px !important;
    border-bottom: 1px solid var(--Simple-Gray-Morning, #f3f3f3);
    cursor: pointer;
  }

  .container_mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    height: 100%;
    margin-top: 16px;
  }

  .chevron {
    position: absolute;
    right: 20px;
    top: 20px;
    transform: scale(1) rotate(-90deg);
    cursor: pointer;

    &.chevron_open {
      transform: scale(1) rotate(-90deg);
    }
  }

  .check {
    position: absolute;
    right: 0px;
    top: 0px;
    transform: scale(0.9);
  }

  .container_mobile > div:last-child {
    border: none;
  }
}
